package com.ftg.learn.chapter12.tow;

import java.util.Arrays;

/**
 * 班级级表
 * @author kangjx
 * @createTime 2022/8/1
 */
public class Cla1Table {

    private Cla1[] cs;

    public Cla1Table(){
        this.cs = new Cla1[10];
    }

    private int index = 0;

    public void add(Cla1 c){
        //扩容
        this.cs[index++] = c;
    }

    public Cla1[] getAllClass(){
        return Arrays.copyOf(cs,index);
    }

}
